package com.itheima.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * reggie-com.itheima.dao
 * Administrator
 * 2023-03-08
 * 16:51
 */
@Mapper
public interface CategoryDao extends BaseMapper<Category> {

    @Select("select count(id) from dish where category_id=#{id}")
    int checkSortDish(Long id);

    @Select("select count(id) from setmeal where category_id=#{id}")
    int checkSortMeal(Long id);
}
